package com.junjiao.util.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.orm.ibatis.SqlMapClientTemplate;

import com.ibatis.sqlmap.client.SqlMapClient;

public class JibatisDao {
	private JdbcTemplate jdbcTemplate;

	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}

	public JdbcTemplate getJdbcTemplate() {
		return jdbcTemplate;
	}

	// iBatis的Template
	private SqlMapClientTemplate sqlMapClientTemplate;

	// 设置ibatis
	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		if (this.sqlMapClientTemplate == null) {
			this.sqlMapClientTemplate = new SqlMapClientTemplate();
		}
		this.sqlMapClientTemplate.setSqlMapClient(sqlMapClient);
	}

	public SqlMapClientTemplate getSqlMapClientTemplate() {
		return sqlMapClientTemplate;
	}
}
